#ifndef _COMMON_H_
#define _COMMON_H_

#include "stc15sdk/config.h"

#define		RESB			P34
#define		IRQB			P41
//WEB = !((!(RWB & RWB) & PHI2))
//OEB = !(RWB & PHI2)
#define		WEB	P32		//INT0
#define		OEB	P33		//INT1
#define		PHI2			P35

#define		SRAM_CSB		P44
#define		EEPROM_CSB		P45
// When BE is high, the RWB and Address Buffers are active. 
// When BE is low, these buffers are disabled.
#define		BE				P42

#define		SYNC			P55


#define INT_UART_RX		0x01


#define ENTER_CRITICAL_AREA()		_nop_();EA=0;_nop_()
#define LEAVE_CRITICAL_AREA()		_nop_();EA=1;_nop_()
//#define ENTER_CRITICAL_AREA()
//#define LEAVE_CRITICAL_AREA()

#endif